package com.qifei.xmlg_backend.entity;

public enum ErrorCode {
    USER_NOT_FOUND(401, "账号不存在"),
    PASSWORD_INCORRECT(401, "密码错误"),
    USERNAME_ALREADY_EXISTS(400, "用户名已存在"),
    FORBIDDEN(403, "无权限"),
    BAD_REQUEST(400, "请求参数错误"),
    SERVER_ERROR(500, "服务器内部错误");

    private final int code;
    private final String message;

    ErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
